#pragma once
#include "Vector.h"
#include "Matrix.h"
#include "Entity.h"

namespace Utility{
	class ICamera : public Graphics::Entity{
	public:
		ICamera():m_viewNeedsUpdate(true),Entity(Entity::ET_CAMERA){
			// Default projection matrix
			createProjectionMatrix(16.0f/10.0f,float(E_PI)/4.0f,0.5f,1000.0f);
		}

		virtual void update(float dt) = 0;

		void createProjectionMatrix(float aspectRatio, float fovAngle, float nearPlane, float farPlane);

		virtual void roll(float radians) = 0;
		virtual void pitch(float radians) = 0;
		virtual void yaw(float radians) = 0;
		
		virtual void strafe(float units) = 0;
		virtual void moveForward(float units) = 0;
		virtual void moveUp(float units) = 0;

		virtual Math::Matrix<4,4>& getViewProjection();
		virtual Math::Matrix<4,4>& getViewMatrix();
		Math::Matrix<4,4>& getProjectionMatrix();
	protected:
		virtual void updateViewMatrix() = 0;

		bool m_viewNeedsUpdate;

		Math::Matrix<4,4>	m_projectionMatrix,
							m_viewMatrix,
							m_viewProjMatrix;
	};
}

typedef boost::shared_ptr<Utility::ICamera> ICameraPtr;